#include<stdio.h>
#include<stdlib.h>

int main()
{
	FILE *fp;
	char name[100]={0};
	int ch,shuzi=0,zimu=0,other=0;
	scanf("%s",name);
	if((fp=fopen("in.txt","r"))==NULL)
	{
	printf("File open error!\n");
	exit(0);
	}
	while(!feof(fp)&&(ch=fgetc(fp))!=EOF)
	{
		if(ch>='0'&&ch<='9')
		{
		shuzi++;
		}
		else if(ch>='a'&&ch<='z')
		{
		zimu++;
	    }
		else if(ch>='A'&&ch<='Z')
		{
		zimu++;
		}
		else other++;
	}
	printf("%d %d %d",zimu,shuzi,other);
	return 0;
} 

